from BeautifulReport import BeautifulReport
import time
import unittest
from config.path_config import CASES_PATH,REPORT_PATH

"""用BeautifulReport方式导出报告"""
#获取集合
pattern = "test_*.py"
#与discover结合
discover = unittest.defaultTestLoader.discover(CASES_PATH, pattern=pattern)
# 使用BeautifulReport报告运行用例
BeautifulReport(discover).report(
    description=u"web自动化crm项目测试报告",
    report_dir=REPORT_PATH,
    filename=time.strftime("测试报告%H%M%S")
)
